package main

import (
	"fmt"
	"io/ioutil"
	"strings"

	"github.com/tealeg/xlsx"
)

func main() {
	buf, err := ioutil.ReadFile("xx.xlsx")
	if err != nil {
		fmt.Println(err)
		return
	}
	str := fmt.Sprint(buf)
	fmt.Println(strings.Replace(str, " ", ",", -1))

	file, err := xlsx.OpenBinary(buf)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println("has sheet count", len(file.Sheet))

	for name, sheet := range file.Sheet {
		fmt.Println("sheet name ", name)
		fmt.Println("had row ", len(sheet.Rows))

		for _, row := range sheet.Rows {
			fmt.Println(row)
		}
	}

}
